package com.epalmpay.controller.channel.datareport;

import com.epalmpay.commom.BaseController;
import com.epalmpay.dto.datareport.TickDataReportInDTO;
import com.epalmpay.dto.datareport.TickDataReportListOutDTO;
import com.epalmpay.dto.datareport.TickDataReportOutDTO;
import com.epalmpay.dto.member.MemberInDTO;
import com.epalmpay.dto.member.MemberListOutDTO;
import com.epalmpay.dto.member.MemberOutDTO;
import com.epalmpay.dto.system.PageDTO;
import com.epalmpay.entity.Page;
import com.epalmpay.exception.ApplicationException;
import com.epalmpay.service.datareport.ITickDataReportService;
import com.epalmpay.status.Rescode;
import com.epalmpay.util.Tools;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2018/3/22.
 */
@Controller
@RequestMapping(value="/merchant/tickreport")
public class TickDataReportController extends BaseController{


    @Resource
    private ITickDataReportService tickDataReportService;

    @RequestMapping(value="/list")
    @ResponseBody
    public TickDataReportListOutDTO listMember(TickDataReportInDTO tickDataReportInDTO){
        TickDataReportListOutDTO tickDataReportListOutDTO=new TickDataReportListOutDTO();
        try {

            tickDataReportListOutDTO = tickDataReportService.getTickList(tickDataReportInDTO);
            tickDataReportListOutDTO.setErrorCode(Rescode.SUCCESS, "处理成功");



            return tickDataReportListOutDTO;
        } catch (ApplicationException ae) {
            tickDataReportListOutDTO.setErrorCode(ae.errCode, ae.errMsg);
            ae.printStackTrace();
        }
        catch (Exception e) {
            tickDataReportListOutDTO.setErrorCode(Rescode.DEFAULT_PREFIX, "处理出现异常");
            e.printStackTrace();
        }
        return tickDataReportListOutDTO;
    }


}
